package a.j;

import a.d.n;
import a.d.o;
import a.d.s;
import a.d.t;
import a.d.w;
import a.d.y;
import a.f.gc;
import a.f.wb;
import a.f.wc;
import a.f.zb;
import a.f.zc;

class gg
{
  static final byte a = 0;
  static final byte b = 1;
  static final byte c = 2;
  private static final int d = 5;
  private static final double e = 5.0D;
  private static final double f = 0.0001D;
  private static final double g = 1.0E-006D;
  private static final byte h = 0;
  private static final byte i = 1;
  private static final byte k = 2;
  private static final byte l = 3;
  static final byte m = 0;
  static final byte n = 1;
  static final byte o = 2;
  private double p = 5.0D;
  private boolean q = true;
  private boolean r = false;
  private double t = 0.0D;
  private byte u = 0;
  private boolean v = false;
  private static final a.d.z w = new a.d.z(1.0D, 0.0D);
  
  public byte a()
  {
    return this.u;
  }
  
  public void a(byte paramByte)
  {
    this.u = paramByte;
  }
  
  public double b()
  {
    return this.p;
  }
  
  public void a(double paramDouble)
  {
    this.p = paramDouble;
  }
  
  public boolean c()
  {
    return this.q;
  }
  
  public void a(boolean paramBoolean)
  {
    this.q = paramBoolean;
  }
  
  public boolean d()
  {
    return this.r;
  }
  
  public void c(boolean paramBoolean)
  {
    this.r = paramBoolean;
  }
  
  public double e()
  {
    return this.t;
  }
  
  public void c(double paramDouble)
  {
    this.t = paramDouble;
  }
  
  public boolean f()
  {
    return this.v;
  }
  
  public void e(boolean paramBoolean)
  {
    this.v = paramBoolean;
  }
  
  public o a(s params, zb paramzb, zc paramzc1, zc paramzc2, re.a_ parama_)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    int j = parama_.a();
    double d1 = parama_.b();
    o localo1 = new o(new w(0.0D, 0.0D), params);
    localo1.a(6.283185307179586D - this.t);
    y localy = wc.a(paramzb, paramzc1, paramzc2, 0.0D);
    if (!bool2)
    {
      if (localy.j() >= 2)
      {
        if (bool2) {
          break label232;
        }
        if (localy.j() != 2) {
          break label230;
        }
        if (bool2) {
          break label232;
        }
        if (w.a(localy.d(), localy.e()) >= 0.0001D) {
          break label230;
        }
      }
      if (bool2) {}
    }
    else if (localy.j() < 2)
    {
      localObject1 = localo1.a();
      localo1.g(paramzc1.a() + ((t)localObject1).a * 0.5D, paramzc1.b() + ((t)localObject1).b * 0.5D);
      if (bool2) {
        break label213;
      }
      if (!bool1) {
        break label209;
      }
    }
    Object localObject1 = localy.d();
    localo1.g(((w)localObject1).a, ((w)localObject1).b);
    label209:
    label213:
    if ((bool2) || (d())) {
      wc.b(localo1);
    }
    return localo1;
    label230:
    label232:
    if (!bool2) {
      if (j < 0)
      {
        i1 = Math.max(0, localy.j() - 1 + j);
        if ((!bool2) && (!bool1)) {
          break label280;
        }
      }
    }
    int i1 = Math.min(localy.j() - 2, j);
    label280:
    n localn = localy.a(i1);
    if (!bool2) {
      if (localn == null)
      {
        localObject2 = localo1.a();
        if (!bool2)
        {
          localo1.g(paramzc1.a() + ((t)localObject2).a * 0.5D, paramzc1.b() + ((t)localObject2).b * 0.5D);
          if (d()) {
            wc.b(localo1);
          }
        }
        return localo1;
      }
    }
    Object localObject2 = localn.d();
    w localw = localn.e();
    if (!bool2) {
      if (localn.h() == 0.0D)
      {
        d2 = paramzc1.a() + paramzc1.c() * 0.5D + paramzb.c().a - (paramzc2.a() + paramzc2.c() * 0.5D + paramzb.d().a);
        double d3 = paramzc1.b() + paramzc1.d() * 0.5D + paramzb.c().b - (paramzc2.b() + paramzc2.d() * 0.5D + paramzb.d().b);
        if (!bool2) {
          if (d2 == 0.0D)
          {
            if (bool2) {
              break label573;
            }
            if (d3 == 0.0D)
            {
              localw = new w(((w)localObject2).a + 1.0E-006D, ((w)localObject2).b);
              if (!bool1) {
                break label618;
              }
            }
          }
        }
        label573:
        double d4 = Math.sqrt(d2 * d2 + d3 * d3);
        localw = new w(((w)localObject2).a + 1.0E-006D * d2 / d4, ((w)localObject2).b + 1.0E-006D * d3 / d4);
        label618:
        localn = new n((w)localObject2, localw);
      }
    }
    if (this.q) {
      localo1.a(d(a.d.z.d(localn.i(), w) - this.t));
    }
    double d2 = Math.abs(parama_.c());
    o localo2 = new o(localo1);
    a(localo2, localn, (w)localObject2, d2);
    if ((bool2) || ((i1 == 0) && ((bool2) || (a(paramzc1, localo2))))) {
      b(localo2, localn, paramzc1, d2);
    }
    o localo3 = new o(localo1);
    a(localo3, localn, localw, d2);
    if (!bool2) {
      if (i1 >= localy.j() - 2)
      {
        if (bool2) {
          break label816;
        }
        if (a(paramzc2, localo3)) {
          a(localo3, localn, paramzc2, d2);
        }
      }
    }
    label816:
    if (!bool2)
    {
      if (w.a(localo2.c(), localo3.c()) < 0.0001D)
      {
        localObject3 = localn.i();
        ((a.d.z)localObject3).c();
        localo3.f(((a.d.z)localObject3).a(), ((a.d.z)localObject3).b());
      }
      if (bool2) {}
    }
    else if (0.0D <= d1)
    {
      if ((!bool2) && (d1 <= 1.0D)) {
        break label1037;
      }
    }
    double d5 = localo3.d() - localo2.d();
    double d6 = localo3.e() - localo2.e();
    double d7 = Math.sqrt(d5 * d5 + d6 * d6);
    double d8 = (bool2) || (d7 != 0.0D) ? d1 / d7 : 0.0D;
    if (!bool2) {
      if (d1 < 0.0D)
      {
        d9 = localo2.d() + d8 * d5;
        d10 = localo2.e() + d8 * d6;
        if (bool2) {
          break label1001;
        }
        if (!bool1) {
          break label1014;
        }
      }
    }
    double d9 = localo3.d() + d8 * d5;
    label1001:
    double d10 = localo3.e() + d8 * d6;
    label1014:
    Object localObject3 = new w(d9, d10);
    if (!bool2)
    {
      if (bool1) {
        label1037:
        localObject3 = new w(localo2.d() * (1.0D - d1) + localo3.d() * d1, localo2.e() * (1.0D - d1) + localo3.e() * d1);
      }
      if (!bool2) {
        localo1.a((w)localObject3);
      }
    }
    else if (d())
    {
      wc.b(localo1);
    }
    return localo1;
  }
  
  private re.a_ g()
  {
    return a(0, 0.0D);
  }
  
  private re.a_ a(int paramInt, double paramDouble)
  {
    return new re.a_(paramInt, paramDouble, b(), f(), a(), e());
  }
  
  public a.c.z a(wb paramwb, zb paramzb, zc paramzc1, zc paramzc2, Object paramObject)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    a.c.z localz = new a.c.z();
    y localy = wc.a(paramzb, paramzc1, paramzc2, 0.0D);
    if (!bool2)
    {
      if (localy.j() >= 2) {
        if (bool2) {
          break label223;
        }
      }
    }
    else
    {
      if (localy.j() != 2) {
        break label217;
      }
      if (bool2) {
        break label223;
      }
      if (localy.a(0).h() >= 0.0001D) {
        break label217;
      }
    }
    o localo = new o(paramwb.d());
    if (!bool2)
    {
      if (localy.j() < 2) {
        localo.g(paramzc1.a() + localo.g() * 0.5D, paramzc1.b() - localo.h() * 0.5D);
      }
    }
    else
    {
      if (bool2) {
        break label179;
      }
      if (!bool1) {
        break label175;
      }
    }
    localo.g(localy.d().a, localy.d().b);
    label175:
    label179:
    if (!bool2) {
      if (d()) {
        wc.b(localo);
      }
    }
    localz.add(new gc(localo, g(), paramwb, false));
    return localz;
    label217:
    label223:
    if (!bool2) {}
    double d1 = paramwb.e() == null ? b() : ((re.a_)paramObject).c();
    o[] arrayOfo1 = new o[localy.j() - 1];
    o[] arrayOfo2 = new o[localy.j() - 1];
    re.a_ locala_1 = 0;
    if (locala_1 < localy.j() - 1)
    {
      arrayOfo1[locala_1] = new o(0.0D, 0.0D, 0.0D, 0.0D);
      arrayOfo2[locala_1] = new o(0.0D, 0.0D, 0.0D, 0.0D);
      a(localy, locala_1, paramwb.d().f(), paramzb, paramzc1, paramzc2, arrayOfo1[locala_1], arrayOfo2[locala_1], d1);
    }
    Object localObject1;
    while (bool2)
    {
      if (bool1) {
        break label462;
      }
      if (w.a(arrayOfo1[locala_1].c(), arrayOfo2[locala_1].c()) < 0.0001D)
      {
        localObject1 = localy.a(locala_1).i();
        ((a.d.z)localObject1).c();
        arrayOfo2[locala_1].f(((a.d.z)localObject1).a(), ((a.d.z)localObject1).b());
      }
      if (!bool2)
      {
        if (d())
        {
          wc.b(arrayOfo1[locala_1]);
          wc.b(arrayOfo2[locala_1]);
        }
        locala_1++;
      }
      if (!bool1) {
        break;
      }
    }
    label462:
    locala_1 = 0;
    label693:
    label695:
    do
    {
      if (locala_1 >= localy.j() - 1) {
        break;
      }
      localObject1 = arrayOfo1[locala_1].l();
      w localw1 = arrayOfo2[locala_1].l();
      double d2 = localw1.a() - ((w)localObject1).a();
      double d3 = localw1.b() - ((w)localObject1).b();
      re.a_ locala_2 = (bool2) || (locala_1 > (localy.j() - 2) / 2) ? locala_1 + 1 - localy.j() : locala_1;
      if (!bool2) {}
      int j = localy.j() == 2 ? 1 : 0;
      double[] arrayOfDouble = a(locala_1, localy, arrayOfo1, arrayOfo2);
      if (!bool2) {
        if (arrayOfDouble[0] > 0.0D)
        {
          locala_3 = a(locala_2, arrayOfDouble[0]);
          localz.add(new gc(arrayOfo1[locala_1].j(d2 * arrayOfDouble[0], d3 * arrayOfDouble[0]), locala_3, paramwb));
          if (bool2) {
            break label695;
          }
          if (!bool1) {
            break label693;
          }
        }
      }
      localz.add(new gc(arrayOfo1[locala_1], a(locala_2, 0.0D), paramwb));
      if (!bool2) {}
      re.a_ locala_3 = j != 0 ? -1 : locala_2;
      Object localObject2;
      if (!bool2) {
        if (arrayOfDouble[1] < 1.0D)
        {
          localObject2 = a(locala_3, arrayOfDouble[1]);
          localz.add(new gc(arrayOfo1[locala_1].j(d2 * arrayOfDouble[1], d3 * arrayOfDouble[1]), localObject2, paramwb));
          if (bool2) {
            break label819;
          }
          if (!bool1) {
            break label811;
          }
        }
      }
      localz.add(new gc(arrayOfo2[locala_1], a(locala_3, 1.0D), paramwb));
      if (!bool2)
      {
        if (arrayOfDouble[0] < 0.5D)
        {
          if (bool2) {
            continue;
          }
          if (arrayOfDouble[1] > 0.5D)
          {
            localObject2 = new o(arrayOfo1[locala_1]);
            w localw2 = w.d(arrayOfo2[locala_1].l(), (w)localObject1);
            ((o)localObject2).b(localw2);
            if (!bool2) {
              if (d()) {
                wc.b((o)localObject2);
              }
            }
            localz.add(new gc((o)localObject2, a(locala_2, 0.5D), paramwb));
          }
        }
        locala_1++;
      }
    } while (!bool1);
    label811:
    label819:
    return localz;
  }
  
  private static double d(double paramDouble)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2) {
      if (paramDouble >= 0.0D) {}
    }
    do
    {
      for (paramDouble += 6.283185307179586D; !bool1; paramDouble -= 6.283185307179586D)
      {
        if (paramDouble <= 6.283185307179586D) {
          break;
        }
        if (bool1) {
          break label51;
        }
      }
    } while (bool2);
    label51:
    return paramDouble;
  }
  
  private static byte a(n paramn)
  {
    boolean bool = ld.E;
    double d1 = a.d.z.d(paramn.i(), w);
    if (!bool) {
      if (d1 >= 0.7853981633974483D)
      {
        if (bool) {
          break label46;
        }
        if (d1 < 2.356194490192345D) {
          return 0;
        }
      }
    }
    label46:
    if (!bool) {
      if (d1 >= 2.356194490192345D)
      {
        if (bool) {
          break label72;
        }
        if (d1 < 3.926990816987241D) {
          return 2;
        }
      }
    }
    label72:
    if (!bool) {
      if (d1 >= 3.926990816987241D)
      {
        if (bool) {
          break label94;
        }
        if (d1 < 5.497787143782138D) {
          return 1;
        }
      }
    }
    label94:
    return 3;
  }
  
  private static byte c(n paramn)
  {
    boolean bool = ld.E;
    double d1 = a.d.z.d(paramn.i(), w);
    if (!bool) {
      if (d1 >= 0.7853981633974483D)
      {
        if (bool) {
          break label60;
        }
        if (d1 < 2.356194490192345D)
        {
          if (!bool) {
            if (d1 <= 1.570796326794897D) {
              return 3;
            }
          }
          return 2;
        }
      }
    }
    label60:
    if (!bool) {
      if (d1 >= 2.356194490192345D)
      {
        if (bool) {
          break label100;
        }
        if (d1 < 3.926990816987241D)
        {
          if (!bool) {
            if (d1 <= 3.141592653589793D) {
              return 0;
            }
          }
          return 1;
        }
      }
    }
    label100:
    if (!bool) {
      if (d1 >= 3.926990816987241D)
      {
        if (bool) {
          break label140;
        }
        if (d1 < 5.497787143782138D)
        {
          if (!bool) {
            if (d1 <= 4.71238898038469D) {
              return 2;
            }
          }
          return 3;
        }
      }
    }
    label140:
    if (!bool) {
      if (d1 <= 3.141592653589793D) {
        return 0;
      }
    }
    return 1;
  }
  
  private void a(o paramo, n paramn, w paramw, double paramDouble)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2)
    {
      if (0 == a()) {
        paramo.g(paramw.a, paramw.b);
      }
    }
    else if (!bool1) {
      return;
    }
    a.d.z localz = a.d.z.c(paramn.i());
    if (!bool2)
    {
      if (2 == a()) {
        localz = new a.d.z(-localz.a(), -localz.b());
      }
      localz.b(Math.abs(paramDouble) + paramo.g() + paramo.h());
    }
    w localw = a.d.z.a(paramw, localz);
    paramo.g(localw.a, localw.b);
    double d1 = 1.7976931348623157E+308D;
    if (!bool2)
    {
      if (this.v) {
        d1 = b(paramn, paramo.l());
      }
    }
    else {
      if (!bool1) {
        break label208;
      }
    }
    Object localObject = o.a(paramo);
    int j = 0;
    do
    {
      if (j >= localObject.length) {
        break;
      }
      d1 = Math.min(d1, b(paramn, localObject[j]));
      j++;
      if ((!bool2) && (bool1)) {
        return;
      }
    } while (!bool1);
    label208:
    localObject = new a.d.z(-localz.a(), -localz.b());
    ((a.d.z)localObject).c();
    ((a.d.z)localObject).b(d1 - Math.abs(paramDouble));
    localw = a.d.z.a(localw, (a.d.z)localObject);
    if (!bool2) {
      paramo.g(localw.a, localw.b);
    }
  }
  
  private void a(o paramo, n paramn, zc paramzc, double paramDouble)
  {
    a(paramo, paramn.e(), paramn.d(), paramzc, false, paramDouble);
  }
  
  private void b(o paramo, n paramn, zc paramzc, double paramDouble)
  {
    a(paramo, paramn.d(), paramn.e(), paramzc, true, paramDouble);
  }
  
  private void a(o paramo, w paramw1, w paramw2, zc paramzc, boolean paramBoolean, double paramDouble)
  {
    boolean bool = ld.E;
    t localt1 = new t(paramzc.a(), paramzc.b(), paramzc.c(), paramzc.d());
    n localn = new n(paramw1, paramw2);
    byte b1 = a(localn);
    w localw1 = a(b1, localn, paramo, paramzc, paramBoolean, paramDouble);
    paramo.a(localw1);
    double d1 = a(localt1, paramo);
    t localt2 = paramo.a();
    if (((bool) || (Math.abs(paramw1.a - paramw2.a) > 0.0001D)) && ((bool) || (Math.abs(paramw1.b - paramw2.b) > 0.0001D)) && ((bool) || ((d1 < 2.5D) || ((bool) || (d1 > 6.0D)))))
    {
      if (!bool) {
        if (b1 != 0)
        {
          if (bool) {
            break label272;
          }
          if (b1 != 1) {
            break label264;
          }
        }
      }
      if (!bool) {
        if (paramw2.a >= localt1.d() - 5.0D - localt2.a * 0.5D)
        {
          if (bool) {
            break label357;
          }
          if (paramw2.a <= localt1.d() + localt1.b() + 5.0D + localt2.a * 0.5D)
          {
            label264:
            if (!bool) {
              if (b1 != 2) {
                label272:
                if ((!bool) && (b1 != 3)) {
                  break label360;
                }
              }
            }
            if (bool) {
              break label357;
            }
            if (paramw2.b >= localt1.e() - 5.0D - localt2.b * 0.5D) {
              if (bool) {
                break label357;
              }
            }
          }
        }
      }
    }
    label357:
    label360:
    int j = paramw2.b > localt1.e() + localt1.c() + 5.0D + localt2.b * 0.5D ? 1 : 0;
    if ((bool) || (j != 0))
    {
      byte b2 = c(localn);
      w localw2 = a(b2, localn, paramo, paramzc, paramBoolean, paramDouble);
      paramo.a(localw2);
      double d2 = a(localt1, paramo);
      if (((!bool) && (d2 < 2.5D)) || ((bool) || ((d2 > d1) && (d1 > 2.5D)))) {
        paramo.a(localw1);
      }
    }
  }
  
  private static double a(t paramt, o paramo)
  {
    return cb.a(paramt, paramo);
  }
  
  private w a(byte paramByte, n paramn, o paramo, zc paramzc, boolean paramBoolean, double paramDouble)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    if (!bool2) {}
    int j = 0 == a() ? 1 : 0;
    o localo = new o(paramo);
    w localw1 = paramn.d();
    w localw2 = paramn.e();
    t localt = localo.a();
    label114:
    label115:
    int i1;
    double d1;
    double d2;
    w localw4;
    w localw5;
    double d3;
    if (!bool2) {
      if (paramByte == 0)
      {
        if (!bool2) {
          if (paramBoolean)
          {
            if (bool2) {
              break label115;
            }
            if (a() == 2) {
              break label114;
            }
          }
        }
        if ((bool2) || (!paramBoolean)) {
          if (bool2) {}
        }
        i1 = a() == 1 ? 1 : 0;
        d1 = paramzc.b() - 5.0D - localt.c() * 0.5D;
        if (!bool2) {
          if (d1 < localw2.b) {
            d1 = localw2.b;
          }
        }
        d2 = i1 != 0 ? Math.min(localw1.a, localw2.a) - localt.a : Math.max(localw1.a, localw2.a) + localt.a;
        if (!bool2) {
          localo.g(d2, d1);
        }
        localw4 = (j != 0) || (this.v) ? localo.l() : a(o.a(localo), paramn);
        localw5 = a(paramn, localw4, 1.0D, 0.0D);
        localo.f(localw5.a - localw4.a, 0.0D);
        if (bool2) {
          break label1253;
        }
        if (j != 0) {
          break label1227;
        }
        d3 = a(paramn, new a.d.z(1.0D, 0.0D), Math.abs(paramDouble));
        if (!bool2)
        {
          if (i1 != 0) {
            d3 = -d3;
          }
          localo.f(d3, 0.0D);
        }
        if (bool2) {
          break label1253;
        }
        if (!bool1) {
          break label1227;
        }
      }
    }
    if (!bool2) {
      if (paramByte == 1)
      {
        if (!bool2) {
          if (paramBoolean)
          {
            if (bool2) {
              break label407;
            }
            if (a() == 1) {
              break label406;
            }
          }
        }
        if ((bool2) || (!paramBoolean)) {
          if (bool2) {}
        }
        label406:
        label407:
        i1 = a() == 2 ? 1 : 0;
        d1 = paramzc.b() + paramzc.d() + 5.0D + localt.c() * 0.5D;
        if (!bool2) {
          if (d1 > localw2.b) {
            d1 = localw2.b;
          }
        }
        d2 = i1 != 0 ? Math.min(localw1.a, localw2.a) - localt.a : Math.max(localw1.a, localw2.a) + localt.a;
        if (!bool2) {
          localo.g(d2, d1);
        }
        localw4 = (j != 0) || (this.v) ? localo.l() : a(o.a(localo), paramn);
        localw5 = a(paramn, localw4, 1.0D, 0.0D);
        localo.f(localw5.a - localw4.a, 0.0D);
        if (bool2) {
          break label1253;
        }
        if (j != 0) {
          break label1227;
        }
        d3 = a(paramn, new a.d.z(1.0D, 0.0D), Math.abs(paramDouble));
        if (!bool2)
        {
          if (i1 == 0) {
            d3 = -d3;
          }
          localo.f(d3, 0.0D);
        }
        if (bool2) {
          break label1253;
        }
        if (!bool1) {
          break label1227;
        }
      }
    }
    if (!bool2)
    {
      if (paramByte == 2)
      {
        if (!bool2) {
          if (paramBoolean)
          {
            if (bool2) {
              break label707;
            }
            if (a() == 2) {
              break label706;
            }
          }
        }
        if ((bool2) || (!paramBoolean)) {
          if (bool2) {}
        }
        label706:
        label707:
        i1 = a() == 1 ? 1 : 0;
        d1 = paramzc.a() - 5.0D - localt.b() * 0.5D;
        if (!bool2) {
          if (d1 < localw2.a) {
            d1 = localw2.a;
          }
        }
        d2 = i1 != 0 ? Math.max(localw1.b, localw2.b) + localt.b : Math.min(localw1.b, localw2.b) - localt.b;
        if (!bool2) {
          localo.g(d1, d2);
        }
        localw4 = (j != 0) || (this.v) ? localo.l() : a(o.a(localo), paramn);
        localw5 = a(paramn, localw4, 0.0D, 1.0D);
        localo.f(0.0D, localw5.b - localw4.b);
        if (bool2) {
          break label1253;
        }
        if (j == 0)
        {
          d3 = a(paramn, new a.d.z(0.0D, 1.0D), Math.abs(paramDouble));
          if (!bool2)
          {
            if (i1 != 0) {
              d3 = -d3;
            }
            localo.f(0.0D, d3);
          }
          if (bool2) {
            break label1253;
          }
          if (!bool1) {}
        }
      }
      else
      {
        if (bool2) {
          break label1253;
        }
      }
    }
    else if (paramByte == 3)
    {
      if (!bool2) {
        if (paramBoolean)
        {
          if (bool2) {
            break label999;
          }
          if (a() == 1) {
            break label998;
          }
        }
      }
      if ((bool2) || (!paramBoolean)) {
        if (bool2) {}
      }
      label998:
      label999:
      i1 = a() == 2 ? 1 : 0;
      d1 = paramzc.a() + paramzc.c() + 5.0D + localt.b() * 0.5D;
      if (!bool2) {
        if (d1 > localw2.a) {
          d1 = localw2.a;
        }
      }
      d2 = i1 != 0 ? Math.max(localw1.b, localw2.b) + localt.b : Math.min(localw1.b, localw2.b) - localt.b;
      if (!bool2) {
        localo.g(d1, d2);
      }
      localw4 = (j != 0) || (this.v) ? localo.l() : a(o.a(localo), paramn);
      localw5 = a(paramn, localw4, 0.0D, 1.0D);
      localo.f(0.0D, localw5.b - localw4.b);
      if (bool2) {
        break label1253;
      }
      if (j == 0)
      {
        d3 = a(paramn, new a.d.z(0.0D, 1.0D), Math.abs(paramDouble));
        if (i1 == 0) {
          d3 = -d3;
        }
        localo.f(0.0D, d3);
      }
    }
    label1227:
    if (!bool2) {
      if (w.a(localo.l(), localw1) > w.a(localo.l(), localw2))
      {
        label1253:
        w localw3 = new w((localw1.a + localw2.a) / 2.0D, (localw1.b + localw2.b) / 2.0D);
        if (!bool2)
        {
          if (paramBoolean) {
            a(localo, paramn, localw3, paramDouble);
          }
        }
        else {
          if (!bool1) {
            break label1350;
          }
        }
        n localn = new n(paramn.e(), paramn.d());
        a(localo, localn, localw3, paramDouble);
      }
    }
    label1350:
    return localo.c();
  }
  
  private static double a(n paramn, a.d.z paramz, double paramDouble)
  {
    boolean bool = ld.E;
    double d1 = a.d.z.d(paramn.i(), paramz);
    if (!bool)
    {
      if (d1 == 1.570796326794897D) {
        return paramDouble;
      }
      if (bool) {}
    }
    else if (d1 > 1.570796326794897D)
    {
      d1 = 3.141592653589793D - d1;
    }
    return paramDouble / Math.sin(d1);
  }
  
  private static w a(w[] paramArrayOfw, n paramn)
  {
    return paramArrayOfw[b(paramArrayOfw, paramn)];
  }
  
  private static int b(w[] paramArrayOfw, n paramn)
  {
    boolean bool = ld.D;
    double d1 = 1.7976931348623157E+308D;
    int j = -1;
    int i1 = 0;
    do
    {
      if (i1 >= paramArrayOfw.length) {
        break;
      }
      double d2 = b(paramn, paramArrayOfw[i1]);
      if (bool) {
        break label61;
      }
      if (d2 < d1)
      {
        j = i1;
        d1 = d2;
      }
      i1++;
    } while (!bool);
    label61:
    return j;
  }
  
  private static double a(n paramn, o paramo)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    w[] arrayOfw = o.a(paramo);
    double d1 = a(paramn, arrayOfw[0]);
    if (!bool2) {
      if (d1 == 0.0D) {
        return 0.0D;
      }
    }
    int j = 1;
    do
    {
      if (j >= arrayOfw.length) {
        break;
      }
      double d3 = a(paramn, arrayOfw[j]);
      if (bool1) {
        break label98;
      }
      if ((bool2) || (d3 != 0.0D))
      {
        if (bool2) {
          continue;
        }
        if (d3 == d1) {}
      }
      else
      {
        return 0.0D;
      }
      j++;
    } while (!bool1);
    label98:
    double d2 = 1.7976931348623157E+308D;
    int i1 = 0;
    do
    {
      while (!bool1)
      {
        if (i1 >= arrayOfw.length) {
          break;
        }
        if (bool1) {
          break label145;
        }
        d2 = Math.min(d2, b(paramn, arrayOfw[i1]));
        i1++;
      }
    } while (bool2);
    label145:
    return d2;
  }
  
  private static double a(n paramn, w paramw)
  {
    boolean bool = ld.E;
    w localw1 = paramn.d();
    w localw2 = paramn.e();
    double d1 = (localw2.a() - localw1.a()) * (paramw.b() - localw1.b()) - (localw2.b() - localw1.b()) * (paramw.a() - localw1.a());
    if (!bool) {
      if (Double.isNaN(d1)) {
        return d1;
      }
    }
    if (!bool)
    {
      if (d1 > 0.0D) {
        return 1.0D;
      }
      if (bool) {}
    }
    else if (d1 < -0.0D)
    {
      return -1.0D;
    }
    return d1;
  }
  
  private static double b(n paramn, w paramw)
  {
    w localw1 = paramn.d();
    w localw2 = paramn.e();
    double d1 = localw2.a - localw1.a;
    double d2 = localw2.b - localw1.b;
    double d3 = paramw.a - localw1.a;
    double d4 = paramw.b - localw1.b;
    double d5 = d3 * d1 + d4 * d2;
    double d6 = d5 * d5 / (d1 * d1 + d2 * d2);
    double d7 = d3 * d3 + d4 * d4 - d6;
    if (!ld.E) {
      if (d7 < 0.0D) {
        d7 = 0.0D;
      }
    }
    return Math.sqrt(d7);
  }
  
  private double[] a(int paramInt, y paramy, o[] paramArrayOfo1, o[] paramArrayOfo2)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    double[] arrayOfDouble = new double[2];
    arrayOfDouble[0] = 0.0D;
    arrayOfDouble[1] = 1.0D;
    w[] arrayOfw = paramy.h();
    double d1 = Math.sqrt(paramArrayOfo1[paramInt].h() * paramArrayOfo1[paramInt].h() + paramArrayOfo1[paramInt].g() * paramArrayOfo1[paramInt].g());
    double d2 = 30.0D + d1;
    double d3 = w.a(paramArrayOfo1[paramInt].l(), paramArrayOfo2[paramInt].l());
    a.d.z localz1;
    a.d.z localz2;
    w localw;
    double d5;
    label240:
    double d6;
    double d7;
    o localo;
    double d10;
    a.d.z localz3;
    if (!bool2) {
      if (paramInt > 0)
      {
        localz1 = new a.d.z(arrayOfw[(paramInt + 1)], arrayOfw[paramInt]);
        localz2 = new a.d.z(arrayOfw[(paramInt - 1)], arrayOfw[paramInt]);
        localw = k.a(paramArrayOfo1[(paramInt - 1)].l(), localz2, paramArrayOfo1[paramInt].l(), localz1);
        if (localw != null)
        {
          d5 = a.d.z.d(localz1, localz2);
          if (!bool2)
          {
            if (a() == 1)
            {
              if (bool2) {
                break label240;
              }
              if (d5 < 3.141592653589793D) {}
            }
            else
            {
              if (bool2) {
                break label499;
              }
            }
          }
          else
          {
            if (a() != 2) {
              break label484;
            }
            if (bool2) {
              break label499;
            }
            if (d5 <= 3.141592653589793D) {
              break label484;
            }
          }
          d6 = w.a(arrayOfw[paramInt], arrayOfw[(paramInt + 1)]);
          d7 = w.a(arrayOfw[(paramInt - 1)], arrayOfw[paramInt]);
          if (!bool2)
          {
            if (d7 + d1 < d6)
            {
              if (bool2) {
                break label421;
              }
              if (w.a(arrayOfw[paramInt], localw) > d7)
              {
                n localn1 = new n(arrayOfw[(paramInt - 1)], a.d.z.a(arrayOfw[(paramInt - 1)], a.d.z.c(localz1)));
                localo = new o(paramArrayOfo2[paramInt]);
                d10 = a(localn1, localo);
                if (d10 > 0.0D)
                {
                  localz3 = new a.d.z(arrayOfw[paramInt], arrayOfw[(paramInt + 1)]);
                  localz3.c();
                  localz3.b(d10);
                  localo.f(localz3.a(), localz3.b());
                }
                localw = localo.l();
              }
            }
            if (bool2) {
              break label450;
            }
          }
          if (w.a(arrayOfw[paramInt], localw) > d6)
          {
            label421:
            arrayOfDouble[0] = 1.0D;
            if (bool2) {
              break label532;
            }
            if (!bool1) {}
          }
          else
          {
            label450:
            double d8 = w.a(localw, paramArrayOfo1[paramInt].l());
            if (bool2) {
              break label532;
            }
            if (d8 < d3)
            {
              arrayOfDouble[0] = (d8 / d3);
              if (bool2) {
                break label532;
              }
              if (bool1)
              {
                label484:
                label499:
                if (bool2) {
                  break label532;
                }
                if (w.a(localw, paramArrayOfo2[paramInt].l()) > d3) {
                  arrayOfDouble[0] = (-Math.min(Math.abs(d2), w.a(localw, paramArrayOfo1[paramInt].l())));
                }
              }
            }
          }
        }
      }
    }
    label532:
    if (!bool2)
    {
      if (paramInt < arrayOfw.length - 2)
      {
        localz1 = new a.d.z(arrayOfw[paramInt], arrayOfw[(paramInt + 1)]);
        localz2 = new a.d.z(arrayOfw[(paramInt + 2)], arrayOfw[(paramInt + 1)]);
        localw = k.a(paramArrayOfo1[(paramInt + 1)].l(), localz2, paramArrayOfo1[paramInt].l(), localz1);
        if (localw != null)
        {
          d5 = a.d.z.d(localz2, localz1);
          if (!bool2)
          {
            if (a() == 1)
            {
              if (bool2) {
                break label689;
              }
              if (d5 < 3.141592653589793D) {
                break label676;
              }
            }
            if (bool2) {}
          }
          else
          {
            if (a() != 2) {
              break label937;
            }
            if (bool2) {
              break label950;
            }
          }
          if (d5 > 3.141592653589793D)
          {
            label676:
            label689:
            d6 = w.a(arrayOfw[paramInt], arrayOfw[(paramInt + 1)]);
            d7 = w.a(arrayOfw[(paramInt + 2)], arrayOfw[(paramInt + 1)]);
            if (!bool2)
            {
              if (d7 + d1 < d6)
              {
                if (bool2) {
                  break label875;
                }
                if (w.a(arrayOfw[(paramInt + 1)], localw) > d7)
                {
                  n localn2 = new n(arrayOfw[(paramInt + 2)], a.d.z.a(arrayOfw[(paramInt + 2)], a.d.z.c(localz1)));
                  localo = new o(paramArrayOfo1[paramInt]);
                  d10 = a(localn2, localo);
                  if (d10 > 0.0D)
                  {
                    localz3 = new a.d.z(arrayOfw[(paramInt + 1)], arrayOfw[paramInt]);
                    localz3.c();
                    localz3.b(d10);
                    localo.f(localz3.a(), localz3.b());
                  }
                  localw = localo.l();
                }
              }
              if (bool2) {
                break label906;
              }
            }
            if (w.a(arrayOfw[(paramInt + 1)], localw) > d6)
            {
              label875:
              arrayOfDouble[1] = 0.0D;
              if (bool2) {
                break label1009;
              }
              if (!bool1) {}
            }
            else
            {
              double d9 = w.a(localw, paramArrayOfo1[paramInt].l()) / d3;
              if (bool2) {
                break label1009;
              }
              if (d9 < 1.0D)
              {
                arrayOfDouble[1] = d9;
                if (bool2) {
                  break label1009;
                }
                if (!bool1) {}
              }
            }
          }
          else
          {
            label937:
            label950:
            d6 = w.a(localw, paramArrayOfo1[paramInt].l()) / d3;
            if (bool2) {
              break label1009;
            }
            if (d6 > 1.0D) {
              arrayOfDouble[1] = Math.max(1.0001D, Math.min(Math.abs(d2), w.a(localw, paramArrayOfo2[paramInt].l())));
            }
          }
        }
      }
      if (bool2) {
        break label1034;
      }
    }
    label906:
    if (arrayOfDouble[0] > arrayOfDouble[1])
    {
      label1009:
      double d4 = arrayOfDouble[0];
      arrayOfDouble[0] = arrayOfDouble[1];
      arrayOfDouble[1] = d4;
    }
    label1034:
    return arrayOfDouble;
  }
  
  public re.a_ a(o paramo, zb paramzb, zc paramzc1, zc paramzc2, re.a_ parama_, byte paramByte, boolean paramBoolean)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    y localy = wc.a(paramzb, paramzc1, paramzc2, 0.0D);
    int j = localy.j();
    if (!bool2)
    {
      if (j < 2) {
        break label70;
      }
      if (bool2) {}
    }
    else
    {
      if (j != 2) {
        break label75;
      }
      if (bool2) {
        break label78;
      }
    }
    if (localy.a(0).h() < 0.0001D) {
      label70:
      return g();
    }
    label75:
    label78:
    double d1 = 1.7976931348623157E+308D;
    double d2 = 1.7976931348623157E+308D;
    Object localObject1 = null;
    Object localObject2 = null;
    w localw1 = paramo.l();
    int i1 = -1;
    if (!bool2) {
      if (paramByte != 1)
      {
        if (bool2) {
          break label154;
        }
        if (paramByte != 2)
        {
          if ((!bool2) && (parama_ == null)) {
            break label202;
          }
          if (bool2) {
            break label208;
          }
          if (parama_.e() != a()) {
            break label202;
          }
        }
      }
    }
    label154:
    if (!bool2) {
      if (parama_.a() < 0)
      {
        i1 = Math.max(0, j - 1 + parama_.a());
        if (bool2) {
          break label209;
        }
        if (!bool1) {
          break label202;
        }
      }
    }
    i1 = Math.min(j - 2, parama_.a());
    label202:
    label208:
    label209:
    o[] arrayOfo1 = new o[localy.j() - 1];
    o[] arrayOfo2 = new o[localy.j() - 1];
    double[] arrayOfDouble1 = new double[localy.j() - 1];
    int i2 = 0;
    label343:
    do
    {
      do
      {
        if (i2 >= j - 1) {
          break;
        }
        arrayOfo1[i2] = new o(0.0D, 0.0D, 0.0D, 0.0D);
        arrayOfo2[i2] = new o(0.0D, 0.0D, 0.0D, 0.0D);
        n localn1 = localy.a(i2);
        if (!bool2) {
          if (bool2) {
            break label343;
          }
        }
        arrayOfDouble1[i2] = (a() == 0 ? b() : (2 != paramByte) && ((bool2) || (parama_ != null)) ? parama_.c() : a(paramo, localn1));
        a(localy, i2, paramo.f(), paramzb, paramzc1, paramzc2, arrayOfo1[i2], arrayOfo2[i2], arrayOfDouble1[i2]);
        i2++;
      } while (!bool1);
    } while (bool2);
    i2 = 0;
    double d8;
    label618:
    label1006:
    label1010:
    do
    {
      do
      {
        if (i2 >= j - 1) {
          break;
        }
        if (bool2) {
          break label1382;
        }
        if (bool1) {
          break label1381;
        }
        if (paramByte == 1)
        {
          if (bool2) {
            continue;
          }
          if (paramByte == 1)
          {
            if (bool2) {
              continue;
            }
            if (i1 != i2) {}
          }
        }
        else
        {
          localw2 = arrayOfo1[i2].l();
          localw3 = arrayOfo2[i2].l();
          if (!bool2) {
            if (w.a(localw2, localw3) < 0.0001D)
            {
              localObject3 = localy.a(i2).i();
              ((a.d.z)localObject3).c();
              localw3 = a.d.z.a(localw3, (a.d.z)localObject3);
            }
          }
          Object localObject3 = a(localw1, localw2, new a.d.z(localw3, localw2));
          double d4 = ((w)localObject3).a - localw2.a;
          d8 = ((w)localObject3).b - localw2.b;
          double d9 = localw3.a - localw2.a;
          double d10 = localw3.b - localw2.b;
          if (!bool2) {
            if (d9 == 0.0D)
            {
              if (bool2) {
                break label618;
              }
              if (d10 == 0.0D)
              {
                d9 = 1.0D;
                d10 = 0.0D;
              }
            }
          }
          if (!bool2)
          {
            if (d9 < 0.0001D)
            {
              if (bool2) {
                break label668;
              }
              if (d9 > -0.0001D)
              {
                d3 = d8 / d10;
                if (bool2) {
                  break label668;
                }
                if (!bool1) {
                  break label719;
                }
              }
            }
            if (bool2) {
              break label716;
            }
          }
          if (d10 < 0.0001D)
          {
            if (bool2) {
              break label716;
            }
            if (d10 > -0.0001D)
            {
              if (bool2) {
                break label717;
              }
              d3 = d4 / d9;
              if (!bool1) {
                break label719;
              }
            }
          }
          double d3 = (d4 / d9 + d8 / d10) / 2.0D;
          double[] arrayOfDouble3 = a(i2, localy, arrayOfo1, arrayOfo2);
          if (!bool2) {
            if (d3 < 0.0D) {
              d3 = -Math.sqrt(d4 * d4 + d8 * d8);
            }
          }
          if (!bool2) {
            if ((2 != paramByte) && (parama_ != null))
            {
              if (!bool2)
              {
                if (i1 == i2) {
                  if (bool2) {
                    break label849;
                  }
                }
              }
              else if (parama_.b() < 0.0D)
              {
                d3 = Math.max(d3, parama_.b());
                arrayOfDouble3[0] = Math.min(arrayOfDouble3[0], parama_.b());
                if (bool2) {
                  break label858;
                }
                if (!bool1) {
                  break label854;
                }
              }
              d3 = Math.max(arrayOfDouble3[0], d3);
            }
          }
          if (!bool2) {
            if (d3 > 1.0D)
            {
              d4 = localw3.a - ((w)localObject3).a;
              d8 = localw3.b - ((w)localObject3).b;
              d3 = Math.max(Math.sqrt(d4 * d4 + d8 * d8), 1.0000001D);
            }
          }
          if (!bool2) {
            if ((2 != paramByte) && (parama_ != null))
            {
              if (!bool2)
              {
                if (i1 == i2) {
                  if (bool2) {
                    break label1001;
                  }
                }
              }
              else if (parama_.b() > 1.0D)
              {
                d3 = Math.min(d3, parama_.b());
                arrayOfDouble3[1] = Math.max(arrayOfDouble3[1], parama_.b());
                if (bool2) {
                  break label1010;
                }
                if (!bool1) {
                  break label1006;
                }
              }
              d3 = Math.min(arrayOfDouble3[1], d3);
            }
          }
          if (!bool2) {}
          int i4 = (d3 > 1.0D) || ((bool2) || (i2 == j - 2)) ? i2 + 1 - j : i2;
          re.a_ locala_2 = new re.a_(i4, d3, arrayOfDouble1[i2], f(), a(), e());
          o localo3 = a(paramo.f(), paramzb, paramzc1, paramzc2, locala_2);
          double d11 = w.a(localo3.l(), localw1);
          double d12 = Math.abs(locala_2.c());
          n localn3 = localy.a(i2);
          double d13 = localn3.h();
          w localw4 = a(localw1, localn3.d(), localn3.i());
          double d14 = w.a(localw2, localw4);
          double d15 = w.a(localw3, localw4);
          if (!bool2) {
            if (d14 > d13)
            {
              if (bool2) {
                break label1220;
              }
              if (d15 < d14)
              {
                d12 += 1.1D * Math.abs(d15);
                if (bool2) {
                  break label1257;
                }
                if (!bool1) {
                  break label1255;
                }
              }
            }
          }
          if (!bool2) {
            if (d15 > d13)
            {
              if (bool2) {
                break label1257;
              }
              if (d14 < d15) {
                d12 += 1.1D * Math.abs(d14);
              }
            }
          }
          if (!bool2)
          {
            if (paramByte == 2)
            {
              if (bool2) {
                break label1300;
              }
              if (i1 != i2) {
                d12 += 5.0D;
              }
            }
            if (bool2) {
              break label1340;
            }
          }
          if (d11 + 0.0001D >= d1)
          {
            if (bool2) {
              continue;
            }
            if (d11 < 0.0001D)
            {
              if (bool2) {
                continue;
              }
              if (d12 >= d2) {}
            }
          }
          else
          {
            localObject1 = locala_2;
            d1 = d11;
            d2 = d12;
            localObject2 = arrayOfDouble3;
          }
        }
        i2++;
      } while (!bool1);
      if (bool2) {
        break label1387;
      }
    } while (bool2);
    label668:
    label716:
    label717:
    label719:
    label849:
    label854:
    label858:
    label1001:
    label1387:
    i2 = localObject1.a() < 0 ? localObject1.a() + (j - 1) : localObject1.a();
    label1220:
    label1255:
    label1257:
    o localo1 = arrayOfo1[i2];
    label1300:
    label1340:
    label1381:
    label1382:
    o localo2 = arrayOfo2[i2];
    w localw2 = localo1.l();
    w localw3 = localo2.l();
    Object localObject4;
    if (!bool2)
    {
      if (parama_ == null)
      {
        arrayOfo1 = new o[localy.j() - 1];
        arrayOfo2 = new o[localy.j() - 1];
        arrayOfDouble1 = new double[localy.j() - 1];
      }
    }
    else
    {
      int i3 = 0;
      do
      {
        do
        {
          if (i3 >= j - 1) {
            break;
          }
          arrayOfo1[i3] = new o(0.0D, 0.0D, 0.0D, 0.0D);
          arrayOfo2[i3] = new o(0.0D, 0.0D, 0.0D, 0.0D);
          localObject4 = localy.a(i3);
          if (bool1) {
            break label1706;
          }
          if (!bool2) {}
          arrayOfDouble1[i3] = (a() == 0 ? b() : (bool2) || (localObject1 != null) ? localObject1.c() : a(paramo, (n)localObject4));
          a(localy, i3, paramo.f(), paramzb, paramzc1, paramzc2, arrayOfo1[i3], arrayOfo2[i3], localObject1.c());
          i3++;
        } while (!bool1);
        localObject2 = a(i2, localy, arrayOfo1, arrayOfo2);
      } while (bool2);
      if (!bool2) {
        if (localObject1.b() < 0.0D) {
          localObject2[0] = Math.min(localObject2[0], localObject1.b());
        }
      }
      if (localObject1.b() > 1.0D) {
        localObject2[1] = Math.max(localObject2[1], localObject1.b());
      }
      localObject2[0] = Math.min(localObject2[0], localObject1.b());
      label1706:
      localObject2[1] = Math.max(localObject2[1], localObject1.b());
    }
    double[] arrayOfDouble2 = new double[4];
    if (!bool2)
    {
      if (localObject2[0] < 0.0D)
      {
        localObject4 = new a.d.z(localw3, localw2);
        ((a.d.z)localObject4).c();
        ((a.d.z)localObject4).b(localObject2[0]);
        arrayOfDouble2[0] = (localw2.a() + ((a.d.z)localObject4).a());
        arrayOfDouble2[1] = (localw2.b() + ((a.d.z)localObject4).b());
        if (bool2) {
          break label1913;
        }
        if (!bool1) {
          break label1907;
        }
      }
      if (bool2) {}
    }
    else
    {
      if (localObject2[0] > 0.0D)
      {
        double d5 = localw3.a() - localw2.a();
        d8 = localw3.b() - localw2.b();
        arrayOfDouble2[0] = (localw2.a() + d5 * localObject2[0]);
        arrayOfDouble2[1] = (localw2.b() + d8 * localObject2[0]);
        if (bool2) {
          break label1913;
        }
        if (!bool1) {
          break label1907;
        }
      }
      arrayOfDouble2[0] = localw2.a();
    }
    arrayOfDouble2[1] = localw2.b();
    label1907:
    label1913:
    if (!bool2)
    {
      if (localObject2[1] > 1.0D)
      {
        a.d.z localz = new a.d.z(localw3, localw2);
        localz.c();
        localz.b(localObject2[1]);
        arrayOfDouble2[2] = (localw3.a() + localz.a());
        arrayOfDouble2[3] = (localw3.b() + localz.b());
        if (bool2) {
          break label2092;
        }
        if (!bool1) {
          break label2090;
        }
      }
      if (bool2) {}
    }
    else
    {
      if (localObject2[1] < 1.0D)
      {
        double d6 = localw3.a() - localw2.a();
        d8 = localw3.b() - localw2.b();
        arrayOfDouble2[2] = (localw2.a() + d6 * localObject2[1]);
        arrayOfDouble2[3] = (localw2.b() + d8 * localObject2[1]);
        if (bool2) {
          break label2092;
        }
        if (!bool1) {
          break label2090;
        }
      }
      arrayOfDouble2[2] = localw3.a();
    }
    arrayOfDouble2[3] = localw3.b();
    label2090:
    if (paramBoolean)
    {
      label2092:
      n localn2 = localy.a(i2);
      double d7 = (localObject1.f() - a.d.z.d(new a.d.z(1.0D, 0.0D), localn2.i())) % 6.283185307179586D;
      re.a_ locala_1 = new re.a_(localObject1.a(), localObject1.b(), localObject1.c(), localObject1.d(), localObject1.e(), d7);
      locala_1.a(arrayOfDouble2[0], arrayOfDouble2[1], arrayOfDouble2[2], arrayOfDouble2[3]);
      return locala_1;
    }
    localObject1.a(arrayOfDouble2[0], arrayOfDouble2[1], arrayOfDouble2[2], arrayOfDouble2[3]);
    return localObject1;
  }
  
  private double a(o paramo, n paramn)
  {
    o localo = new o(paramo);
    w localw = paramo.l();
    if (c())
    {
      d1 = d(a.d.z.d(paramn.i(), w) - localo.k());
      localo.a(d1);
      localo.b(localw);
    }
    double d1 = a.d.z.d(paramn.i(), new n(paramn.d(), localw).i());
    double d2 = this.v ? b(paramn, localw) : a(paramn, localo);
    if (!ld.E) {
      if (d1 > 3.141592653589793D) {
        return -d2;
      }
    }
    return d2;
  }
  
  private static w a(w paramw1, w paramw2, a.d.z paramz)
  {
    double d1 = paramw1.a - paramw2.a;
    double d2 = paramw1.b - paramw2.b;
    double d3 = paramz.a();
    double d4 = paramz.b();
    double d5 = d3 * d3 + d4 * d4;
    double d6 = (d1 * d3 + d2 * d4) / d5;
    return new w(paramw2.a + d6 * d3, paramw2.b + d6 * d4);
  }
  
  private void a(y paramy, int paramInt, s params, zb paramzb, zc paramzc1, zc paramzc2, o paramo1, o paramo2, double paramDouble)
  {
    boolean bool = ld.E;
    n localn = paramy.a(paramInt);
    w localw1 = localn.d();
    w localw2 = localn.e();
    if (!bool) {
      if (localn.h() == 0.0D)
      {
        d1 = paramzc1.a() + paramzc1.c() * 0.5D + paramzb.c().a - (paramzc2.a() + paramzc2.c() * 0.5D + paramzb.d().a);
        double d2 = paramzc1.b() + paramzc1.d() * 0.5D + paramzb.c().b - (paramzc2.b() + paramzc2.d() * 0.5D + paramzb.d().b);
        if (!bool) {
          if (d1 == 0.0D)
          {
            if (bool) {
              break label230;
            }
            if (d2 == 0.0D)
            {
              localw2 = new w(localw1.a + 0.0001D, localw1.b);
              if (!ld.D) {
                break label275;
              }
            }
          }
        }
        label230:
        double d3 = Math.sqrt(d1 * d1 + d2 * d2);
        localw2 = new w(localw1.a + 0.0001D * d1 / d3, localw1.b + 0.0001D * d2 / d3);
        label275:
        localn = new n(localw1, localw2);
      }
    }
    double d1 = 6.283185307179586D - this.t;
    if (!bool)
    {
      if (this.q) {
        d1 = d(a.d.z.d(localn.i(), w) - this.t);
      }
      paramo1.a(params);
      paramo1.a(d1);
      a(paramo1, localn, localw1, paramDouble);
    }
    if (!bool)
    {
      if (paramInt == 0)
      {
        if (bool) {
          break label419;
        }
        if (a(paramzc1, paramo1)) {
          b(paramo1, localn, paramzc1, paramDouble);
        }
      }
      paramo2.a(params);
      paramo2.a(d1);
      a(paramo2, localn, localw2, paramDouble);
    }
    label419:
    if ((bool) || ((paramInt == paramy.j() - 2) && ((bool) || (a(paramzc2, paramo2))))) {
      a(paramo2, localn, paramzc2, paramDouble);
    }
  }
  
  private boolean a(zc paramzc, o paramo)
  {
    t localt = new t(paramzc.a(), paramzc.b(), paramzc.c(), paramzc.d());
    return o.a(paramo, localt, 5.0D);
  }
  
  private static w a(n paramn, w paramw, double paramDouble1, double paramDouble2)
  {
    w localw1 = paramn.e();
    w localw2 = paramn.d();
    double d1 = paramw.a();
    double d2 = paramw.b();
    return k.a(localw1.a(), localw1.b(), localw2.a(), localw2.b(), d1, d2, d1 + paramDouble1, d2 + paramDouble2);
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.gg

 * JD-Core Version:    0.7.0.1

 */